Subject: Queue-Level Non-Blocking and Multi-Threading Support

From: "Jack Sanders" <[email-masked]>
Date: Wed, 25 Aug 93 15:57:28 EDT

Non-Blocking SIG members,

A document has been placed on the CIW document library (with
directory/file name /ciw/sig/nonblock/nb-qmtad.ps)
to address the requirement described below.
Comments are solicited.  If consensus can be
reached during the non-blocking SIG meeting at the September CIW,
AD status will be requested for the proposal.

Background
----------

Work in progress for CPI-C 2.0 defines queue-level processing and
queue-level non-blocking support that allows a program to have multiple
independent operations in progress simultaneously on a single
conversation.  This is required, for example, for full-duplex
conversations so that a a program can perform independent and concurrent
Send and Receive operations.  On the other hand, multi-threaded programs
achieve the same effect by creating multiple program threads to perform
independent and concurrent operations.

Requirement
-----------

A CPI-C 2.0 implementation on a system that supports multi-threading
should allow programs to have multiple independent operations in progress
simultaneously on a single conversation through the use of any of the
following support:

  multiple threads
  queue-level non-blocking
  both multiple threads and queue-level non-blocking.

In particular, this will allow a multi-threaded program to perform the
independent operations required for full-duplex conversations without
having to use non-blocking.

Summary of Proposal
-------------------

No new or changed calls, conversation characteristics, return codes,
etc., are required.  For a CPI-C 2.0 implementation on a system that
supports multi-threading:

Until a program issues a call to select a non-blocking level for a
conversation,

  all calls on that conversation are processed in blocking mode.

  a single-threaded program can have at most one call operation in
  progress on that conversation at a time.

  a multi-threaded program may have multiple call operations in progress
  on that conversation, but only one call operation is allowed to be in
  progress on a conversation queue at a time.

A program issues Set_Processing_Mode to select conversation-level
non-blocking.  After the call completes successfully, only one operation
is allowed to be in progress on the conversation at a time.

A program issues Set_Queue_Processing_Mode or Set_Queue_Callback_Function
to select queue-level non-blocking.  The program may have multiple call
operations in progress on the conversation, but only one call operation
is allowed to be in progress on a conversation queue at a time.

Regards,
Jack